package com.fg.cloud.framework.redis.finals;

import org.apache.shiro.cache.Cache;

import com.fg.cloud.framework.redis.RedisManager;

public class JedisShiroCacheManager implements ShiroCacheManager {
 
    private RedisManager redisManager;
 
    public RedisManager getRedisManager() {
        return redisManager;
    }
 
    public void setRedisManager(RedisManager redisManager) {
        this.redisManager = redisManager;
    }
 
    @Override
    public void destroy() {
        redisManager.init();
        redisManager.flushDB();
    }

	@Override
	public <K, V> Cache<K, V> getCache(String name) {
		return this.getCache(name);
	}
 
}
